<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>2018/12/4</title>
    <script src="http://mockjs.com/dist/mock.js"></script>
    <script src="node_modules/jquery/dist/jquery.min.js"></script>
</head>
<body>

</body>
<script>
   Mock.mock(/\.json/,function (options) {
      return options
   });
    $.ajax({
      url:'hello.json',
      dataType:'json'
    }).done(function (data,status,jqXHR) {
      $('<pre>').text(JSON.stringify(data,null,4)).appendTo('body')
    });
    $.ajax({
        url:'hello.json',
        dataType: 'json',
        data:{
            foo:1,
            bar:2,
            faz:3
        }
    }).done(function (data,status,jqXHR) {
        $('<pre>').text(JSON.stringify(data,null,4)).appendTo('body')
    })

</script>
</html>
